home *** CD-ROM | disk | FTP | other *** search
/ Internet Surfer 2.0 / Internet Surfer 2.0 (Wayzata Technology) (1996).iso / pc / textfile / faqs / fonts_fa / part09 < prev    next >
Encoding:
Internet Message Format  |  1992-12-26  |  18.0 KB

  1. Xref: bloom-picayune.mit.edu comp.fonts:6619 news.answers:4471
  2. Path: bloom-picayune.mit.edu!enterpoop.mit.edu!think.com!ames!saimiri.primate.wisc.edu!caen!nic.umass.edu!dime!dime.cs.umass.edu!walsh
  3. From: walsh@cs.umass.edu (Norman Walsh)
  4. Newsgroups: comp.fonts,news.answers
  5. Subject: comp.fonts FAQ.8.Utilities
  6. Summary: This posting answers frequently asked questions about fonts.
  7.          It addresses both general font questions and questions that
  8.      are specific to a particular platform.
  9. Message-ID: <WALSH.92Dec7141722@ibis.cs.umass.edu>
  10. Date: 7 Dec 92 19:17:22 GMT
  11. Expires: 8 Jan 93 00:00:00 GMT
  12. References: <9212071410.WW57338@cs.umass.EDU>
  13. Sender: news@dime.cs.umass.edu
  14. Reply-To: walsh@cs.umass.edu (Norm Walsh)
  15. Followup-To: poster
  16. Organization: Dept of Comp and Info Sci, Univ of Mass (Amherst)
  17. Lines: 449
  18. Approved: news-answers-request@MIT.Edu
  19.  
  20. Archive-name: fonts-faq/part09
  21. Version: 1.1.1.
  22.  
  23. FAQ for comp.fonts: Chapter VIII: Font utilities
  24.  
  25. Version 1.1.1., Release 07DEC92
  26.  
  27. Welcome to the comp.fonts FAQ.  These articles, posted monthly, describe many
  28. of the basic questions that seem to be repeated frequently on comp.fonts.
  29. Your comments are both welcome and encouraged.
  30.  
  31. The FAQ is divided into chapters.  The first chapter is a general overview.
  32. Most of the remaining chapters are more-or-less platform specific.
  33.  
  34. For more information about the FAQ, please consult the beginning of the first
  35. chapter.  The FAQ is always available via anonymous ftp from ibis.cs.umass.edu
  36. in /pub/norm/comp.fonts/FAQ*
  37.  
  38. This chapter covers the following topics:
  39.  
  40. 0.    Notes about the utilities
  41. 1.    PS2PK
  42. 2.    TeX Utilities
  43. 3.    MFPic
  44. 4.    GNU Font Utilities
  45. 5.    Font Editors
  46. 6.    t1utils
  47.  
  48. ------------------------------------------------------------------------------
  49.  
  50. 0. Notes about the utilities
  51.  
  52.    I have just started collecting information about font utilities.  I 
  53.    will gladly add any information that you can pass my way.  Please send
  54.    your submissions to norm <walsh@cs.umass.edu>.  
  55.  
  56.    I would appreciate it if you could include a paragraph or so of description
  57.    and the appropriate site/filename for retrieval.
  58.  
  59. 1. PS2PK version 1.2
  60.  
  61.   PS2PK is a utility for converting Type1 postscript fonts into TeX PK files.
  62.   The source code is distributed and it has been compiled for both *nix boxes
  63.   and MS-DOS based machines.
  64.  
  65.   Here is the original announcement:
  66.  
  67.                             Ps2pk-1.2 available
  68.                             -------------------
  69.                                  (June 1992)
  70.     
  71.     Version 1.2 of ps2pk is now available on:
  72.        ftp.urc.tue.nl (address: 131.155.2.79)
  73.        directory:    /pub/tex
  74.        files:        ps2pk12.README         (  1k)    This file
  75.                      ps2pk12.tar.Z          (391k)    Sources
  76.                      ps2pk386.zip           (232k)    MSDOS executables
  77.                      utopia.tar.Z           (342k)    Adobe Utopia font family
  78.                      courier.tar.Z          (207k)    IBM Courier font family
  79.     
  80.        For people having difficulties in handling UNIX `.tar.Z' format I
  81.        have made some UNIX tools (only executables) available in:
  82.        directories:  /pub/unixtools/dos
  83.                      /pub/unixtools/vms
  84.     
  85.        See the system specific TARZ file for some help.
  86.     
  87.        Ftp.urc.tue.nl can not handle E-mail requests. But sites are free
  88.        to put the ps2pk12 stuff on any server that can.
  89.     
  90.     When do you need ps2pk?
  91.     ----------------------
  92.     Ps2pk is a tool that converts a PostScript type1 font into a corres-
  93.     ponding TeX PK font.  The tool is especially interesting if you want
  94.     to use fully hinted type1 fonts in your DVI previewer (instead of the
  95.     unhinted type1 fonts currently used in GhostScript) or on a printer
  96.     that has no PostScript interpreter.
  97.     
  98.     In order to use the ps2pk generated fonts your driver and previewer need
  99.     to support virtual fonts.  The reason is that PostScript fonts and TeX
  100.     fonts do have a different font encoding and handle ligatures in a
  101.     different way.  With virtual fonts the PostScript world (encoding +
  102.     ligatures) can be mapped to the old style TeX world on which the current
  103.     plain macro packages still are based (despite the fact that TeX3.0 can
  104.     handle 8bits).
  105.     
  106.     It is also possible to use the ps2pk generated PK fonts directly
  107.     
  108.   In addition, a modified version of PS2PK exists on ibis.cs.umass.edu.  I
  109.   have added some hacks to better support really large renderings and a
  110.   primitive "range" facility.
  111.  
  112. 2. TeX Utilities
  113.  
  114.   There are many TeX font utilities.  For TeX related questions, I direct
  115.   you to comp.text.tex or the Info-TeX mailing list.  I will happily list
  116.   any utilities here that the comp.fonts public feels should be present.
  117.   I am listing MetaFont because it is the obvious font-specific component
  118.   of TeX and PKtoSFP because it allows anyone to use PS2PK to create
  119.   LaserJet softfonts.
  120.  
  121.   Liam R. E. Quin <lee@sq.com> is the original author of the MetaFont
  122.   section.  It has been hacked at a bit by norm to make it fit the tone
  123.   of the comp.fonts FAQ.  Assume that norm is responsible for any errors,
  124.   not Liam.
  125.  
  126. 2.1. MetaFont
  127.  
  128. 2.1.1. About MetaFont:
  129.  
  130.        Metafont is a programming language for describing fonts.  It was
  131.        written by Donald Knuth and is documented in
  132.  
  133.      Computers & Typesetting/C: The METAFONTbook
  134.      Knuth, Donald E.
  135.      Addison Wesley, 1986
  136.      ISBN 0-201-13445-4, or 0-201-13444-6 (soft cover)
  137.      Library access: Z250.8.M46K58, or 686.2'24, or 85-28675.
  138.  
  139.        A font written in MetaFont is actually a computer program which,
  140.        when run, will generate a bitmap (`raster') for a given typeface
  141.        at a given size, for some particular device.
  142.  
  143. 2.1.2. What do you need in order to use the fonts:
  144.  
  145.        You cannot print the MetaFont fonts directly (unless you want a
  146.        listing of the program, that is).  Instead, you must generate a
  147.        bitmap font and use that to print something.
  148.  
  149.        If you are using TeX, the sequence of steps is something like
  150.        this:
  151.  
  152.          MF -> metafont -> GF              [ convert MetaFont program
  153.                            TFM              into a bitmapped font ]
  154.   
  155.          GF -> gftopk -> PK             [ represent the bitmapped font
  156.                                           efficiently ]
  157.  
  158.          TEX -> tex -> DVI              [ convert TeX document into
  159.          TFM                              device independent output ]
  160.  
  161.          DVI -> dvi2xxx -> XXX          [ convert DVI to output device
  162.          PK                               format ]
  163.  
  164.          XXX -> printer -> hardcopy     [ print the dvi2xxx output ]
  165.  
  166.        The above steps are idealized.  In reality, you have to make sure
  167.        that the fonts get installed in the correct places and you may
  168.        have to adjust description files, etc.  The friendly folks on
  169.        comp.text.tex can probably get it staightened out for you if you
  170.        can't find a local guru.
  171.  
  172.        If you are not using TeX, it's almost impossible to predict.  At
  173.        some point in the above sequence, you'll insert some other
  174.        conversion program and proceed differently.  Here, for example, is
  175.        how you might use TeX fonts with WordPerfect and a LaserJet
  176.        printer.
  177.  
  178.          PK -> PKtoSFP -> SFP           [ PK to LaserJet softfont ]
  179.  
  180.      SFP -> SFP2Auto -> TFM         [ Make HP AutoFont TFM file ]
  181.  
  182.       SFP -> PTR -> installation     [ Install the fonts into WP ]
  183.      TFM
  184.  
  185.      Use WordPerfect as you normally would.
  186.  
  187. 2.1.3. How to use Metafont fonts with Troff
  188.  
  189.        If, when you run troff, you get the message `typesetter busy', you
  190.        have the original Ossanna-troff, also called otroff.  Chris Lewis
  191.        has a package which will let you use TeX fonts with troff -- it's
  192.        called psroff, and comes with documentation.
  193.  
  194.          ftp: gatekeeper.dec.com (16.1.0.2) pub/misc/psroff-3.0
  195.          ftp: ftp.cs.toronto.edu [128.100.1.105] pub/psroff-3.0/*
  196.  
  197.        If, when you run troff, you get something like this:
  198.  
  199.      x T 300
  200.      x res 300 1 1
  201.  
  202.        you have ditroff.  This is sometimes called titroff or psroff.  In
  203.        this case, you will probably need to do the following:
  204.  
  205.          1) convert the font to your printer's format
  206.          2) generate a width table for the font
  207.          3) add the font to the DESC file for the appropriate device
  208.          4) arrange for troff to download the font
  209.          5) tell troff about the font by running `makedev DESC' in the 
  210.         right place.
  211.  
  212.        If, when you run troff, you get something like this:
  213.  
  214.          X hp(SCM)(CM)(AF)(AD) 300 1 1
  215.      Y P default letter 2550 3300 0 0 90 90 2460 3210
  216.  
  217.        you have sqtroff:
  218.  
  219.          1) convert the font to your printer's format
  220.          2) generate a width table for the font
  221.          3) add the font to the DESC file for the appropriate device
  222.          4) put the font in the appropriate raster directory
  223.          5) tell sqtroff about the font by running `sqmakedev DESC' or 
  224.             `sqinstall'.
  225.  
  226.        In each case, you should be able to get help from your vendor.
  227.  
  228.        Note that Chris Lewis' psroff package has software to make width
  229.        tables for troff from pk files.
  230.  
  231. 2.1.4. Converting between font formats
  232.  
  233.        Conversions to and from pbm and pk format were posted to
  234.        comp.text.tex and to alt.sources on the 9th of August, 1990 by
  235.        Angus Duggan (ajcd@cs.ed.ac.uk).  The program is pbmtopk, and
  236.        there are also at least two patches.
  237.  
  238.        Chris Lewis' psroff package includes a program to go from pk both
  239.        to the HP LaserJet and to PostScript.
  240.  
  241.        John McClain (ophelp@tamvenus.bitnet) has some conversion programs
  242.        for various graphics formats to/and from pk files.
  243.  
  244.        A PC program, CAPTURE, turns HPGL files into PK format, US$130
  245.        from Micro Programs Inc., 251 Jackson Ave., Syosset, NY 11791
  246.        U.S.A.
  247.  
  248.        Metaplot can take pen-plotter files and prouce metafont files;
  249.        contact wilcox@cis.ohio-state.edu
  250.  
  251.        Kinch Cmputer Company sell .pk fonts derived from PostScript
  252.        fonts.  Kinch Computer Co., 501 S. Meadow St.Ithaca, NY 14850
  253.        U.S.A.  telephone: +1 607 273 0222; fax: +1 607 273 0484
  254.  
  255. 2.1.5. Where to get bitmap versions of the fonts
  256.  
  257.        There are archives containing the bitmaps of many of these fonts
  258.        at various sizes and resolutions.  The fonts must have been
  259.        generated for the correct print engine: e.g. write-white or
  260.        write-black.  The archives generally hold only the sizes used by
  261.        TeX.  These are `magstep' sizes, and are not exact point sizes.
  262.        It is probably better to generate them from the Metafont sources
  263.        yourself if you can.
  264.  
  265.        The best place to look for raster fonts was almost certainly
  266.  
  267.          mims-iris.waterloo.edu
  268.  
  269.        but it isn't any more, the fonts have all gone.  Let me know if
  270.        you find them elsewhere.  Most people seem to have moved to using
  271.        PostScript fonts or Bitstream ones instead now.
  272.  
  273.        Some other sites are:
  274.  
  275.          ctrsci.math.utah.edu (128.110.198.1)
  276.          science.utah.edu (128.110.192.2)
  277.          ymir.claremont.edu (134.173.4.23)
  278.  
  279.        The occasional posting of ftp sites to comp.misc and comp.archives
  280.        lists these and several other sites.
  281.  
  282. 2.1.6. Getting fonts by FTP and Mail
  283.  
  284.        If you are using ftp, you will need either the name of the host or
  285.        the Internet number.  For example, to connect to ymir, listed as
  286.        ftp: ymir.claremont.edu [134.173.4.23] you will need to type
  287.        something like
  288.  
  289.          ftp ymir.claremont.edu
  290.  
  291.        If that doesn't work, try using the number:
  292.  
  293.      ftp 134.173.4.23
  294.  
  295.        If that doesn't work, on Unix systems you can use nslookup (it's
  296.        usually /usr/etc/nslookup) to find the host number -- it might
  297.        have changed.  Type the entire host name, and after a few seconds
  298.        nslookup will give you the address.
  299.  
  300.        Once you have connected, you will need to go to the appropriate
  301.        directory, lists its contents, and retrieve the files.
  302.  
  303.        Most of the machines listed here run Unix, and you use "ls" and
  304.        "cd" to list files and to change directories.  Ymir runs VMS, and
  305.        you will have to put square brackets around directory names, like
  306.        [this].
  307.  
  308.        Remember that although Metafont sources are text files, pk fonts
  309.        are not ASCII, and you will have to use binary mode for them.  In
  310.        general, use text mode for README files and *.mf files, and binary
  311.        mode for other font files.  Files ending in .Z are compressed
  312.        binary files -- you will need to use binary mode, and then
  313.        uncompress the files when you get them.
  314.  
  315.  
  316.        You can get files from ymir by sending mail messages to
  317.  
  318.          mailserv@ymir.claremont.edu
  319.  
  320.        For example,
  321.  
  322.          send [tex.mf.misc]cmapl10.mf
  323.  
  324.        will get the file cmapl10.mf from the directory "tex.mf.misc".
  325.        You can't get binary files in this way.
  326.  
  327.        There is an ftp-by-mail BITNET service, BITFTP, for BITNET users.
  328.  
  329.        Before getting large files by mail, please remember to get
  330.        permission from all intervening sites.  Ask your site
  331.        administrator, who can send mail to Postmaster at each site on the
  332.        way if necessary.
  333.  
  334. 2.2. PKtoSFP/SFPtoPK
  335.  
  336.        Convert fonts from TeX PK format to HP LaserJet (bitmap) format.
  337.  
  338. 2.3. Metafont -> PostScript conversion
  339.  
  340.        There are (I believe) two programs that perform this task.  At
  341.        least one of them is called "mf2ps".  If you have any more 
  342.        information about these tools, please let me know.
  343.  
  344. 2.4. PostScript -> Metafont
  345.  
  346.        There is at least one tool for this purpose.  I believe that it
  347.        is called "ps2mf".  If you have any more information about
  348.        these tools, please let me know.
  349.  
  350. 2.5. PKtoPS
  351.  
  352.        Included in the psroff distribution, this utility converts PK 
  353.        fonts into PostScript fonts (bitmaps, I presume).  If you have
  354.        any more information about these tools, please let me know.
  355.  
  356. 2.6. PKtoBDF / MFtoBDF
  357.  
  358.        From the SeeTeX distribution, programs to help previewers under
  359.        X11.
  360.  
  361. 3. MFpic
  362.  
  363.   MFpic is a macro package for including pictures in TeX documents.  The idea
  364.   behind this package is to have Metafont do the actual drawing, and store the
  365.   pictures in a font that TeX can include in the document.  The macros have
  366.   been designed so that the user should never have to learn Metafont to use
  367.   these macros -- the TeX macros actually write the Metafont file for you.
  368.  
  369. 4. GNU Font Utilities
  370.  
  371.   Here is a brief description of the programs included:
  372.  
  373.   * imageto extracts a bitmap font from an image in PBM or IMG format, or
  374.     converts the image to Encapsulated PostScript.
  375.  
  376.   * xbfe is a hand-editor for bitmap fonts which runs under X11.
  377.  
  378.   * charspace adds side bearings to a bitmap font.
  379.  
  380.   * limn fits outlines to bitmap characters.
  381.  
  382.   * bzrto converts a generic outline font to Metafont or PostScript.
  383.  
  384.   * gsrenderfont renders a PostScript outline font at a particular point
  385.     size and resolution, yielding a bitmap font.
  386.  
  387.   * fontconvert can rearrange or delete characters in a bitmap font,
  388.     filter them, split them into pieces, combine them, etc., etc.
  389.  
  390.   * imgrotate rotates or flips an IMG file.
  391.  
  392.   We need volunteers to help create fonts for the GNU project.  You do not
  393.   need to be an expert type designer to help, but you do need to know enough
  394.   about TeX and/or PostScript to be able to install and test new fonts.
  395.   Example: if you know neither (1) the purpose of TeX utility program `gftopk'
  396.   nor (2) what the PostScript `scalefont' command does, you probably need more
  397.   experience before you can help.
  398.  
  399.   If you can volunteer, the first step is to compile the font utilities.
  400.   After that, contact me (karl@gnu.ai.mit.edu).  I will get you a scanned type
  401.   specimen image.  The manual explains how to use these utilities to turn that
  402.   into a font you can use in TeX or PostScript.
  403.  
  404.   You can get the source by ftp from 
  405.     prep.ai.mit.edu [18.71.0.38]:pub/gnu/fontutils-0.5.tar.Z.
  406.  
  407.   And also from these other sites around the world; please check them
  408.   before prep.
  409.  
  410.   United States: wuarchive.wustl.edu   gatekeeper.dec.com:pub/GNU
  411.                  uxc.cso.uiuc.edu      ftp.uu.net:packages/gnu
  412.  
  413.   Europe:        archive.eu.net        src.doc.ic.ac.uk:gnu    ftp.funet.fi
  414.                  nic.funet.fi:pub/gnu  ugle.unit.no            isy.liu.se
  415.                  ftp.diku.dk
  416.  
  417.   elsewhere:     ftp.cs.titech.ac.jp   utsun.s.u-tokyo.ac.jp:ftpsync/prep
  418.                  archie.au:gnu
  419.  
  420.   You can also order tapes with GNU software from the Free Software Foundation
  421.   (thereby supporting the GNU project); send mail to gnu@prep.ai.mit.edu for
  422.   the latest prices and ordering information, or retrieve the file DISTRIB
  423.   from a GNU archive.
  424.  
  425. 5. Font editors
  426.  
  427.   - BDF -
  428.  
  429.     There is a bdf font editor that comes with HP/Apollo workstations.  It's
  430.     called 'edfont'.  It's not the best but it works.
  431.  
  432.     Gary <Gocek.Henr801C@Xerox.COM> reports:
  433.  
  434.     The standard X distribution for X11R5 contains "xfed", which allows you
  435.     to play with BDF fonts.  "xfedor" has a more elaborate user interface,
  436.     and is available on most contrib directories.
  437.  
  438.     The last time I tried:
  439.  
  440.     "xfedor" couldn't handle BDF files with more than 256 characters.
  441.  
  442.     "xfed" aborts if the BDF file contains a COMMENT line with no other
  443.     text.  The workaround is to edit the BDF file, to put text after the
  444.     word COMMENT.  A single blank space is sufficient.  For some reason,
  445.     the standard BDF files included in the X release contain blank spaces
  446.     on the otherwise empty COMMENT lines.  It was probably easier to add
  447.     the space to the COMMENT lines of every BDF file than it was to fix the
  448.     lex code for xfed.  :-)
  449.  
  450.   - PK -
  451.  
  452.     The GNU font utilities include an X-based editor called Xbfe which edits
  453.     bitmapped fonts under X.
  454.  
  455.     Eberhard Mattes' emTeX includes PKedit.
  456.  
  457. 6. t1utils
  458.  
  459.   This is a snippet from the README file for I. Lee Hetherington's 
  460.   <ilh@lcs.mit.edu> t1utils package:
  461.  
  462.   t1utils is a collection of simple type-1 font manipulation programs.
  463.   Together, they allow you to convert between PFA (ASCII) and PFB
  464.   (binary) formats, disassemble PFA or PFB files into human-readable
  465.   form, reassemble them into PFA or PFB format.  Additionally you can
  466.   extract font resources from a Macintosh font file (ATM/Laserwriter).
  467.  
  468. -- END OF PART VIII --
  469.